package cn.dnui_cr503.dnuifood_16110100503.controller;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import cn.dnui_cr503.dnuifood_16110100503.R;

public abstract class BaseActivity extends AppCompatActivity {
    protected int layout_file = R.layout.activity_main;
    abstract void initViews();
    abstract void initEvents();
    abstract void initDate();
    void setLayout(int layout_file){
        setContentView(layout_file);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setLayout(layout_file);
        initViews();
        initEvents();
        initDate();
    }
}
